![]() |
PATH![]() |
![]() ![]() |
A compound Tell statement specifies the default target of the commands it contains.
tell referenceToObject
[ statement ]...
end [ tell ]
referenceToObject is a reference to an application object, system object, or script object.
The next three examples show how to close a window using, respectively, a compound Tell statement, a simple Tell statement, and a very brief version of a simple Tell statement.
tell application "Finder"
tell front window
close
end tell
end tell
tell front window of application "Finder"
close
end tell
tell app "Finder" to close front window
The following example closes a window on a remote computer.
tell application "Finder" of machine ¬
"Steve's PowerBook" of zone "Fourth Floor South"
tell front window
close
end tell
end tell
If referenceToObject specifies an application on a remote computer, additional conditions must be met. These conditions are described in References to Remote Applications.
If referenceToObject specifies an application on the same computer that is not running, AppleScript launches the application.